3.56 \(\int \frac {\sin ^3(e+f x)}{a+b \tan ^2(e+f x)} \, dx\)

Optimal. Leaf size=84 \[ \frac {\cos ^3(e+f x)}{3 f (a-b)}-\frac {a \cos (e+f x)}{f (a-b)^2}-\frac {a \sqrt {b} \tan ^{-1}\left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b}}\right )}{f (a-b)^{5/2}} \]

[Out]

-a*cos(f*x+e)/(a-b)^2/f+1/3*cos(f*x+e)^3/(a-b)/f-a*arctan(sec(f*x+e)*b^(1/2)/(a-b)^(1/2))*b^(1/2)/(a-b)^(5/2)/
f

________________________________________________________________________________________

Rubi [A]  time = 0.12, antiderivative size = 84, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3664, 453, 325, 205} \[ \frac {\cos ^3(e+f x)}{3 f (a-b)}-\frac {a \cos (e+f x)}{f (a-b)^2}-\frac {a \sqrt {b} \tan ^{-1}\left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b}}\right )}{f (a-b)^{5/2}} \]

Antiderivative was successfully verified.

[In]

Int[Sin[e + f*x]^3/(a + b*Tan[e + f*x]^2),x]

[Out]

-((a*Sqrt[b]*ArcTan[(Sqrt[b]*Sec[e + f*x])/Sqrt[a - b]])/((a - b)^(5/2)*f)) - (a*Cos[e + f*x])/((a - b)^2*f) +
 Cos[e + f*x]^3/(3*(a - b)*f)

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 325

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[((c*x)^(m + 1)*(a + b*x^n)^(p + 1))/(a*
c*(m + 1)), x] - Dist[(b*(m + n*(p + 1) + 1))/(a*c^n*(m + 1)), Int[(c*x)^(m + n)*(a + b*x^n)^p, x], x] /; Free
Q[{a, b, c, p}, x] && IGtQ[n, 0] && LtQ[m, -1] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 453

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(c*(e*x)^(m
+ 1)*(a + b*x^n)^(p + 1))/(a*e*(m + 1)), x] + Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(a*e^n*(m + 1)), In
t[(e*x)^(m + n)*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] && (IntegerQ[n] ||
GtQ[e, 0]) && ((GtQ[n, 0] && LtQ[m, -1]) || (LtQ[n, 0] && GtQ[m + n, -1])) &&  !ILtQ[p, -1]

Rule 3664

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Sec[e + f*x], x]}, Dist[1/(f*ff^m), Subst[Int[((-1 + ff^2*x^2)^((m - 1)/2)*(a - b + b*ff^2*x^2)^p)/x^(
m + 1), x], x, Sec[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rubi steps

\begin {align*} \int \frac {\sin ^3(e+f x)}{a+b \tan ^2(e+f x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {-1+x^2}{x^4 \left (a-b+b x^2\right )} \, dx,x,\sec (e+f x)\right )}{f}\\ &=\frac {\cos ^3(e+f x)}{3 (a-b) f}+\frac {a \operatorname {Subst}\left (\int \frac {1}{x^2 \left (a-b+b x^2\right )} \, dx,x,\sec (e+f x)\right )}{(a-b) f}\\ &=-\frac {a \cos (e+f x)}{(a-b)^2 f}+\frac {\cos ^3(e+f x)}{3 (a-b) f}-\frac {(a b) \operatorname {Subst}\left (\int \frac {1}{a-b+b x^2} \, dx,x,\sec (e+f x)\right )}{(a-b)^2 f}\\ &=-\frac {a \sqrt {b} \tan ^{-1}\left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b}}\right )}{(a-b)^{5/2} f}-\frac {a \cos (e+f x)}{(a-b)^2 f}+\frac {\cos ^3(e+f x)}{3 (a-b) f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.66, size = 149, normalized size = 1.77 \[ \frac {(a-b) \cos (e+f x) ((a-b) \cos (2 (e+f x))-5 a-b)+6 a \sqrt {b} \sqrt {a-b} \tan ^{-1}\left (\frac {\sqrt {a-b}-\sqrt {a} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right )+6 a \sqrt {b} \sqrt {a-b} \tan ^{-1}\left (\frac {\sqrt {a-b}+\sqrt {a} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right )}{6 f (a-b)^3} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[e + f*x]^3/(a + b*Tan[e + f*x]^2),x]

[Out]

(6*a*Sqrt[a - b]*Sqrt[b]*ArcTan[(Sqrt[a - b] - Sqrt[a]*Tan[(e + f*x)/2])/Sqrt[b]] + 6*a*Sqrt[a - b]*Sqrt[b]*Ar
cTan[(Sqrt[a - b] + Sqrt[a]*Tan[(e + f*x)/2])/Sqrt[b]] + (a - b)*Cos[e + f*x]*(-5*a - b + (a - b)*Cos[2*(e + f
*x)]))/(6*(a - b)^3*f)

________________________________________________________________________________________

fricas [A]  time = 0.55, size = 206, normalized size = 2.45 \[ \left [\frac {2 \, {\left (a - b\right )} \cos \left (f x + e\right )^{3} + 3 \, a \sqrt {-\frac {b}{a - b}} \log \left (\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} + 2 \, {\left (a - b\right )} \sqrt {-\frac {b}{a - b}} \cos \left (f x + e\right ) - b}{{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}\right ) - 6 \, a \cos \left (f x + e\right )}{6 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} f}, \frac {{\left (a - b\right )} \cos \left (f x + e\right )^{3} - 3 \, a \sqrt {\frac {b}{a - b}} \arctan \left (-\frac {{\left (a - b\right )} \sqrt {\frac {b}{a - b}} \cos \left (f x + e\right )}{b}\right ) - 3 \, a \cos \left (f x + e\right )}{3 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} f}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)^3/(a+b*tan(f*x+e)^2),x, algorithm="fricas")

[Out]

[1/6*(2*(a - b)*cos(f*x + e)^3 + 3*a*sqrt(-b/(a - b))*log(((a - b)*cos(f*x + e)^2 + 2*(a - b)*sqrt(-b/(a - b))
*cos(f*x + e) - b)/((a - b)*cos(f*x + e)^2 + b)) - 6*a*cos(f*x + e))/((a^2 - 2*a*b + b^2)*f), 1/3*((a - b)*cos
(f*x + e)^3 - 3*a*sqrt(b/(a - b))*arctan(-(a - b)*sqrt(b/(a - b))*cos(f*x + e)/b) - 3*a*cos(f*x + e))/((a^2 -
2*a*b + b^2)*f)]

________________________________________________________________________________________

giac [B]  time = 1.38, size = 180, normalized size = 2.14 \[ \frac {a b \arctan \left (\frac {a \cos \left (f x + e\right ) - b \cos \left (f x + e\right )}{\sqrt {a b - b^{2}}}\right )}{{\left (a^{2} - 2 \, a b + b^{2}\right )} \sqrt {a b - b^{2}} f} + \frac {a^{2} f^{5} \cos \left (f x + e\right )^{3} - 2 \, a b f^{5} \cos \left (f x + e\right )^{3} + b^{2} f^{5} \cos \left (f x + e\right )^{3} - 3 \, a^{2} f^{5} \cos \left (f x + e\right ) + 3 \, a b f^{5} \cos \left (f x + e\right )}{3 \, {\left (a^{3} f^{6} - 3 \, a^{2} b f^{6} + 3 \, a b^{2} f^{6} - b^{3} f^{6}\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)^3/(a+b*tan(f*x+e)^2),x, algorithm="giac")

[Out]

a*b*arctan((a*cos(f*x + e) - b*cos(f*x + e))/sqrt(a*b - b^2))/((a^2 - 2*a*b + b^2)*sqrt(a*b - b^2)*f) + 1/3*(a
^2*f^5*cos(f*x + e)^3 - 2*a*b*f^5*cos(f*x + e)^3 + b^2*f^5*cos(f*x + e)^3 - 3*a^2*f^5*cos(f*x + e) + 3*a*b*f^5
*cos(f*x + e))/(a^3*f^6 - 3*a^2*b*f^6 + 3*a*b^2*f^6 - b^3*f^6)

________________________________________________________________________________________

maple [A]  time = 0.57, size = 107, normalized size = 1.27 \[ \frac {a \left (\cos ^{3}\left (f x +e \right )\right )}{3 f \left (a -b \right )^{2}}-\frac {b \left (\cos ^{3}\left (f x +e \right )\right )}{3 f \left (a -b \right )^{2}}-\frac {a \cos \left (f x +e \right )}{\left (a -b \right )^{2} f}+\frac {a b \arctan \left (\frac {\left (a -b \right ) \cos \left (f x +e \right )}{\sqrt {\left (a -b \right ) b}}\right )}{f \left (a -b \right )^{2} \sqrt {\left (a -b \right ) b}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(f*x+e)^3/(a+b*tan(f*x+e)^2),x)

[Out]

1/3/f/(a-b)^2*a*cos(f*x+e)^3-1/3/f/(a-b)^2*b*cos(f*x+e)^3-a*cos(f*x+e)/(a-b)^2/f+1/f*a*b/(a-b)^2/((a-b)*b)^(1/
2)*arctan((a-b)*cos(f*x+e)/((a-b)*b)^(1/2))

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)^3/(a+b*tan(f*x+e)^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(b-a>0)', see `assume?` for mor
e details)Is b-a positive or negative?

________________________________________________________________________________________

mupad [B]  time = 13.37, size = 382, normalized size = 4.55 \[ -\frac {\frac {2\,\left (2\,a+b\right )}{3\,{\left (a-b\right )}^2}+\frac {4\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2}{{\left (a-b\right )}^2}+\frac {2\,b\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4}{{\left (a-b\right )}^2}}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}-\frac {a\,\sqrt {b}\,\mathrm {atan}\left (\frac {\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (\frac {\sqrt {b}\,\left (8\,a^7\,b-32\,a^6\,b^2+48\,a^5\,b^3-32\,a^4\,b^4+8\,a^3\,b^5\right )}{{\left (a-b\right )}^{9/2}}-\frac {a\,\sqrt {b}\,\left (a-2\,b\right )\,\left (-16\,a^9+128\,a^8\,b-432\,a^7\,b^2+800\,a^6\,b^3-880\,a^5\,b^4+576\,a^4\,b^5-208\,a^3\,b^6+32\,a^2\,b^7\right )}{8\,{\left (a-b\right )}^{15/2}}\right )-\frac {a\,\sqrt {b}\,\left (a-2\,b\right )\,\left (16\,a^9-96\,a^8\,b+240\,a^7\,b^2-320\,a^6\,b^3+240\,a^5\,b^4-96\,a^4\,b^5+16\,a^3\,b^6\right )}{8\,{\left (a-b\right )}^{15/2}}\right )\,{\left (a-b\right )}^5}{4\,a^8\,b-16\,a^7\,b^2+24\,a^6\,b^3-16\,a^5\,b^4+4\,a^4\,b^5}\right )}{f\,{\left (a-b\right )}^{5/2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(e + f*x)^3/(a + b*tan(e + f*x)^2),x)

[Out]

- ((2*(2*a + b))/(3*(a - b)^2) + (4*a*tan(e/2 + (f*x)/2)^2)/(a - b)^2 + (2*b*tan(e/2 + (f*x)/2)^4)/(a - b)^2)/
(f*(3*tan(e/2 + (f*x)/2)^2 + 3*tan(e/2 + (f*x)/2)^4 + tan(e/2 + (f*x)/2)^6 + 1)) - (a*b^(1/2)*atan(((tan(e/2 +
 (f*x)/2)^2*((b^(1/2)*(8*a^7*b + 8*a^3*b^5 - 32*a^4*b^4 + 48*a^5*b^3 - 32*a^6*b^2))/(a - b)^(9/2) - (a*b^(1/2)
*(a - 2*b)*(128*a^8*b - 16*a^9 + 32*a^2*b^7 - 208*a^3*b^6 + 576*a^4*b^5 - 880*a^5*b^4 + 800*a^6*b^3 - 432*a^7*
b^2))/(8*(a - b)^(15/2))) - (a*b^(1/2)*(a - 2*b)*(16*a^9 - 96*a^8*b + 16*a^3*b^6 - 96*a^4*b^5 + 240*a^5*b^4 -
320*a^6*b^3 + 240*a^7*b^2))/(8*(a - b)^(15/2)))*(a - b)^5)/(4*a^8*b + 4*a^4*b^5 - 16*a^5*b^4 + 24*a^6*b^3 - 16
*a^7*b^2)))/(f*(a - b)^(5/2))

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)**3/(a+b*tan(f*x+e)**2),x)

[Out]

Timed out

________________________________________________________________________________________